home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / basic / qbfaqr01.zip / FADE13-2.BAS < prev    next >
BASIC Source File  |  1992-08-10  |  1KB  |  49 lines

  1. 'Date: 05-19-92 (02:48)
  2. 'From: RICH GELDREICH
  3. 'Subj: (R)FADING SCREEN MODE 13
  4. '------------------------------------------------------------------------
  5. 'Aaa- what the hell. The following two programs will allow you to fade
  6. 'any VGA screen. The first, USEFADE.BAS, shows you how to use the
  7. 'subroutine. The second, FADE.BAS, makes a small .OBJ file which contains
  8. 'the machine language subroutine to fade the screen. Follow the
  9. 'instructions at the beginning of FADE.BAS to make a .QLB or .LIB file.
  10. '****PART 1****
  11. 'VGA screen fader
  12. 'By Rich Geldreich
  13.  
  14. '(NOTE:Works strange in text modes. Seems that the palette in
  15. 'the text mode is not contagious for some odd reason.
  16. 'FadeScreen 0,255,1 works however.)
  17.  
  18. 'The total time for a fade is about:
  19. 'TotalTime=(Delay/70)*64
  20.  
  21. DEFINT A-Z
  22. DECLARE SUB FadeScreen (BYVAL StartC, BYVAL EndC, BYVAL Delay)
  23. 'fade the text screen...
  24. FadeScreen 0, 255, 1
  25. 'go to 320x200x256
  26. SCREEN 13
  27. 'draw some garbage
  28. FOR A = 0 TO 40
  29.     X = RND * 320: Y = RND * 200
  30.     R = RND * 50: C = RND * 255
  31.     CIRCLE (X, Y), R, C
  32.     PAINT (X, Y), RND * 255, C
  33. NEXT
  34. 'fade it to black
  35. FadeScreen 0, 255, 2    '256 color fade, two frames each fade
  36. 'go to 640x480x16
  37. SCREEN 12
  38. 'draw some more garbage
  39. FOR A = 0 TO 80
  40.     X = RND * 640: Y = RND * 480
  41.     R = RND * 50: C = RND * 15
  42.     CIRCLE (X, Y), R, C
  43.     PAINT (X, Y), RND * 15, C
  44. NEXT
  45. 'fade it to black again
  46. FadeScreen 0, 15, 1     '16 color fade, one frame each fade
  47. SLEEP 1
  48. PALETTE
  49.